home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyo (Python 2.5)
-
- import util
-
- class ConversationManager(object):
-
- def __init__(self, msn):
- self.msn = msn
- self._convs = { }
-
-
- def find_convo(self, name = (), count = (), type = (), f = None):
- result = []
- if f is None:
-
- f = lambda x: True
-
- if not util.isiterable(name):
- name = (name,)
-
- if not util.isiterable(type):
- type = (type,)
-
- if not util.isiterable(count):
- count = (count,)
-
- functions = [
- f]
-
- def namechecker(c):
- mynames = set(name)
- cnames = set(c.buddies)
- mynames.discard(self.self_buddy.name)
- cnames.discard(self.self_buddy.name)
- return mynames == cnames
-
- if name:
- functions.append(namechecker)
-
-
- def typechecker(c):
- return c.type in type
-
- if type:
- functions.append(typechecker)
-
-
- def countchecker(c):
- return len(c.room_list) in count
-
- if count:
- functions.append(countchecker)
-
- import inspect
- log.debug('find_convo: name=%s,count=%s,type=%s,f=%s', name, count, type, inspect.getsource(f).strip())
- for None in self._convs.values():
- conv = None
- if (all,)((lambda .0: for _f in .0:
- _f(conv))(functions)):
- result.append(conv)
- continue
-
- return result
-
-
-